package com.lanyun.serviceimpl;

import com.lanyun.dao.StockMapper;
import com.lanyun.pojo.*;
import com.lanyun.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class StockServiceImpl implements StockService {

    @Autowired
    private StockMapper mapper;

//    @Override
//    public List<Warehouse> showHouse() {
//        return mapper.showHouse();
//    }
//
//    @Override
//    public List<Product> showPro() {
//        return mapper.showPro();
//    }
//
//    @Override
//    public Integer count() {
//        return mapper.count();
//    }



    @Override
    public List<Product> showProByHou(Integer hou) {
        return mapper.showProByHou(hou);
    }

    @Override
    public List<Stock> showStock(Integer hous,Integer pro) {
        return mapper.showStock(hous,pro);
    }

    @Override
    public List<Map<String,Object>> showWarning() {
        return mapper.showWarning();
    }
    public List<Map<String,Object>> showStatAll(String begin,String end){
        return mapper.showStatAll(begin,end);
    }


    @Override
    public List<Map<String, Object>> showTrend(String begin,String end) {
        return mapper.showTrend(begin,end);
    }

    @Override
    public List<Admin> groupAdmin() {
        return mapper.groupAdmin();
    }

    @Override
    public List<Product> groupPro() {
        return mapper.groupPro();
    }

    @Override
    public List<Warehouse> groupHous() {
        return mapper.groupHous();
    }

    @Override
    public List<Stockinfo> showStockInfo(Integer admin, String begin, String end, Integer Hous, Integer Pro, String type) {
        return mapper.showStockInfo(admin,begin,end,Hous,Pro,type);
    }

    @Override
    public List<String> getYear() {
        return mapper.getYear();
    }

    /*入库*/
    @Override
    public Integer StockEnd(String wid, String pid, String amounts) {
        return mapper.StockEnd(wid,pid,amounts);
    }
}
